home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Over 1,000 Windows 95 Programs
/
Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso
/
1469
/
effects.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1996-08-03
|
16KB
|
478 lines
VERSION 4.00
Begin VB.Form frmEffects
BorderStyle = 1 'Fixed Single
Caption = "VBMax Electronic Message Demo - Special Effects"
ClientHeight = 4125
ClientLeft = 240
ClientTop = 1695
ClientWidth = 8700
Height = 4530
Icon = "Effects.frx":0000
Left = 180
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4125
ScaleWidth = 8700
Top = 1350
Width = 8820
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "&Close"
Height = 495
Left = 7140
TabIndex = 43
Top = 3300
Width = 1395
End
Begin VB.Frame Frame1
Caption = "Wipe from"
Height = 3255
Index = 4
Left = 5280
TabIndex = 28
Top = 780
Width = 1575
Begin VB.CommandButton cmdEffect
Caption = "Top"
Height = 315
Index = 26
Left = 120
TabIndex = 29
Top = 300
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Right"
Height = 315
Index = 27
Left = 120
TabIndex = 30
Top = 660
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Bottom"
Height = 315
Index = 28
Left = 120
TabIndex = 31
Top = 1020
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Left"
Height = 315
Index = 29
Left = 120
TabIndex = 32
Top = 1380
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Top and Bottom"
Height = 315
Index = 30
Left = 120
TabIndex = 33
Top = 1740
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Left and Right"
Height = 315
Index = 31
Left = 120
TabIndex = 34
Top = 2100
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "^ Center v"
Height = 315
Index = 32
Left = 120
TabIndex = 35
Top = 2460
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "< Center >"
Height = 315
Index = 33
Left = 120
TabIndex = 36
Top = 2820
Width = 1335
End
End
Begin VB.Frame Frame1
Caption = "Build from"
Height = 3255
Index = 3
Left = 3540
TabIndex = 19
Top = 780
Width = 1575
Begin VB.CommandButton cmdEffect
Caption = "< Center >"
Height = 315
Index = 25
Left = 120
TabIndex = 27
Top = 2820
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "^ Center v"
Height = 315
Index = 24
Left = 120
TabIndex = 26
Top = 2460
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Left and Right"
Height = 315
Index = 23
Left = 120
TabIndex = 25
Top = 2100
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Top and Bottom"
Height = 315
Index = 22
Left = 120
TabIndex = 22
Top = 1020
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Left"
Height = 315
Index = 21
Left = 120
TabIndex = 23
Top = 1380
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Bottom"
Height = 315
Index = 20
Left = 120
TabIndex = 21
Top = 660
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Right"
Height = 315
Index = 19
Left = 120
TabIndex = 24
Top = 1740
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Top"
Height = 315
Index = 18
Left = 120
TabIndex = 20
Top = 300
Width = 1335
End
End
Begin VB.CheckBox chkShowGrid
Caption = "Show grid"
Height = 315
Left = 7140
TabIndex = 42
Top = 2760
Value = 1 'Checked
Width = 1215
End
Begin VB.Frame Frame1
Caption = "Slide off to"
Height = 3255
Index = 2
Left = 1800
TabIndex = 10
Top = 780
Width = 1575
Begin VB.CommandButton cmdEffect
Caption = "Top Left"
Height = 315
Index = 10
Left = 120
TabIndex = 11
Top = 300
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Top Center"
Height = 315
Index = 11
Left = 120
TabIndex = 12
Top = 660
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Top Right"
Height = 315
Index = 12
Left = 120
TabIndex = 13
Top = 1020
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Right"
Height = 315
Index = 13
Left = 120
TabIndex = 14
Top = 1380
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Bottom Right"
Height = 315
Index = 14
Left = 120
TabIndex = 15
Top = 1740
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Bottom Center"
Height = 315
Index = 15
Left = 120
TabIndex = 16
Top = 2100
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Bottom Left"
Height = 315
Index = 16
Left = 120
TabIndex = 17
Top = 2460
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Left"
Height = 315
Index = 17
Left = 120
TabIndex = 18
Top = 2820
Width = 1335
End
End
Begin VB.Frame Frame1
Caption = "Slide on from"
Height = 3255
Index = 1
Left = 60
TabIndex = 1
Top = 780
Width = 1575
Begin VB.CommandButton cmdEffect
Caption = "Left"
Height = 315
Index = 9
Left = 120
TabIndex = 9
Top = 2820
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Bottom Left"
Height = 315
Index = 8
Left = 120
TabIndex = 8
Top = 2460
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Bottom Center"
Height = 315
Index = 7
Left = 120
TabIndex = 7
Top = 2100
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Bottom Right"
Height = 315
Index = 6
Left = 120
TabIndex = 6
Top = 1740
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Right"
Height = 315
Index = 5
Left = 120
TabIndex = 5
Top = 1380
Width = 1275
End
Begin VB.CommandButton cmdEffect
Caption = "Top Right"
Height = 315
Index = 4
Left = 120
TabIndex = 4
Top = 1020
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Top Center"
Height = 315
Index = 3
Left = 120
TabIndex = 3
Top = 660
Width = 1335
End
Begin VB.CommandButton cmdEffect
Caption = "Top Left"
Height = 315
Index = 2
Left = 120
TabIndex = 2
Top = 300
Width = 1335
End
End
Begin VB.Frame Frame1
Caption = "Other"
Height = 1815
Index = 0
Left = 7020
TabIndex = 37
Top = 780
Width = 1635
Begin VB.CommandButton cmdEffect
Caption = "Flash"
Height = 315
Index = 34
Left = 120
TabIndex = 41
Top = 1380
Width = 1395
End
Begin VB.CommandButton cmdClear
Caption = "Clear"
Height = 315
Left = 120
TabIndex = 40
Top = 1020
Width = 1395
End
Begin VB.CommandButton cmdEffect
Caption = "Static"
Height = 315
Index = 1
Left = 120
TabIndex = 39
Top = 660
Width = 1395
End
Begin VB.CommandButton cmdEffect
Caption = "Continuous Scroll"
Height = 315
Index = 0
Left = 120
TabIndex = 38
Top = 300
Width = 1395
End
End
Begin VB.PictureBox picDisplay
Height = 510
Left = 60
ScaleHeight = 450
ScaleWidth = 8565
TabIndex = 0
Top = 120
Width = 8625
End
Attribute VB_Name = "frmEffects"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Const mcCAPTION = "VBMax: Visual Basic to the Max"
Dim moEDisp As New CElectronicDisplay
Private Sub Form_Load()
Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
With moEDisp
.BackColor = &H800000
.ForeColor = &HFFFF&
.Interval = 20
.Effect = gnEFFECT_STATIC
Set .Container = picDisplay
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
moEDisp.Shutdown
Set moEDisp = Nothing
Set frmEffects = Nothing
End Sub
Private Sub cmdEffect_Click(Index As Integer)
Dim lEndTime As Single
With moEDisp
Select Case Index
Case gnEFFECT_SCROLL
.Interval = 20
.Effect = Index
.Caption = "Scrollin', scrollin', scrollin', keep them pixels rollin'... "
Case gnEFFECT_SLIDE_TO_TOP_LEFT To gnEFFECT_SLIDE_TO_LEFT, _
gnEFFECT_WIPE_FROM_TOP To gnEFFECT_WIPE_TO_LEFT_AND_RIGHT
.Effect = gnEFFECT_STATIC
.Caption = mcCAPTION 'Display the message
lEndTime = Timer() + 0.5
Do Until Timer() >= lEndTime 'Pause for brain to register it
DoEvents
Loop
.Effect = Index 'Remove it using special effect
Case gnEFFECT_FLASH
.flashcount = 5
.Effect = Index
.Caption = mcCAPTION
Case Else
.Cls
.Effect = Index
.Caption = mcCAPTION
End Select
End With
End Sub
Private Sub cmdClear_Click()
moEDisp.Cls
End Sub
Private Sub chkShowGrid_Click()
With moEDisp
.ShowGrid = Not .ShowGrid
End With
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub